﻿using System;
using System.Collections.Generic;
using Freshbooks.Properties;
using RestSharp;

namespace Freshbooks
{
    public class LanguageService
    {
        private readonly FreshbooksApi _client;

        protected internal LanguageService(FreshbooksApi client)
        {
            _client = client;
        }

        public List<Model.Language> ListLanguage()
        {
            var request = _client.GetRequest();
            request.AddParameter("text/xml", Resources.language_list, ParameterType.RequestBody);
            return _client.GetCollection<Model.Language>(request);
        }
    }
}